class Solution:
    def findContentChildren(self, g, s):
        """
        :type g: List[int]
        :type s: List[int]
        :rtype: int
        """
        g = sorted(g)
        s = sorted(s)

        g1 = 0
        s1 = 0

        while g1 < len(g) and s1 < len(s):
            if g[g1] <= s[s1]:
                s1 += 1
                g1 += 1
            else:
                s1 += 1
        return g1